home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / D-G / Driver 2.2.sit / Driver 2.2 / driver.h < prev    next >
MacBinary  |  1993-10-23  |  2.1 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: driver.h

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sat Oct 23 17:47:08 1993, modified Sat Oct 23 17:47:08 1993, creator Think C, type ASCII, 1661 bytes "driver.h" , at 0x6fd 346 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 64 72 69 76 65 72 | 2e 68 00 00 00 00 00 00 |..driver|.h......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 06 7d 00 | 00 01 5a a8 ef 56 dc a8 |......}.|..Z..V..|
|00000060| ef 56 dc 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.V......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fb 64 00 00 |........|.....d..|
|00000080| 2f 2a 20 64 72 69 76 65 | 72 2e 68 20 32 2e 32 20 |/* drive|r.h 2.2 |
|00000090| 2d 20 55 73 65 66 75 6c | 20 64 65 63 6c 61 72 61 |- Useful| declara|
|000000a0| 74 69 6f 6e 73 20 66 6f | 72 20 64 72 69 76 65 72 |tions fo|r driver|
|000000b0| 2e 63 2e 20 42 79 20 50 | 65 74 65 20 52 65 73 6e |.c. By P|ete Resn|
|000000c0| 69 63 6b 20 2a 2f 0d 0d | 23 69 66 6e 64 65 66 20 |ick */..|#ifndef |
|000000d0| 5f 5f 44 52 49 56 45 52 | 5f 5f 0d 23 64 65 66 69 |__DRIVER|__.#defi|
|000000e0| 6e 65 20 5f 5f 44 52 49 | 56 45 52 5f 5f 0d 0d 2f |ne __DRI|VER__../|
|000000f0| 2a 20 46 6c 61 67 73 20 | 66 6f 72 20 49 6e 73 74 |* Flags |for Inst|
|00000100| 61 6c 6c 52 41 4d 44 72 | 69 76 65 72 20 61 6e 64 |allRAMDr|iver and|
|00000110| 20 52 65 6d 6f 76 65 52 | 41 4d 44 72 69 76 65 72 | RemoveR|AMDriver|
|00000120| 2e 20 41 64 64 20 74 6f | 67 65 74 68 65 72 20 2a |. Add to|gether *|
|00000130| 2f 0d 74 79 70 65 64 65 | 66 20 65 6e 75 6d 20 7b |/.typede|f enum {|
|00000140| 0d 09 6f 70 65 6e 20 3d | 20 30 78 30 31 2c 09 09 |..open =| 0x01,..|
|00000150| 2f 2a 20 4f 70 65 6e 20 | 74 68 65 20 64 72 69 76 |/* Open |the driv|
|00000160| 65 72 20 61 66 74 65 72 | 20 69 6e 73 74 61 6c 6c |er after| install|
|00000170| 65 64 20 2a 2f 0d 09 74 | 68 69 6e 6b 44 41 54 41 |ed */..t|hinkDATA|
|00000180| 20 3d 20 30 78 30 32 2c | 09 2f 2a 20 44 72 69 76 | = 0x02,|./* Driv|
|00000190| 65 72 20 75 73 65 73 20 | 54 48 49 4e 4b 20 43 2c |er uses |THINK C,|
|000001a0| 20 74 68 65 72 65 66 6f | 72 65 20 75 73 65 73 20 | therefo|re uses |
|000001b0| 44 41 54 41 20 72 73 72 | 63 20 2a 2f 0d 09 74 68 |DATA rsr|c */..th|
|000001c0| 69 6e 6b 4d 75 6c 53 65 | 67 20 3d 20 30 78 30 34 |inkMulSe|g = 0x04|
|000001d0| 09 2f 2a 20 44 72 69 76 | 65 72 20 75 73 65 73 20 |./* Driv|er uses |
|000001e0| 54 48 49 4e 4b 20 43 20 | 6d 75 6c 74 69 2d 73 65 |THINK C |multi-se|
|000001f0| 67 6d 65 6e 74 20 44 43 | 4f 44 20 72 73 72 63 27 |gment DC|OD rsrc'|
|00000200| 73 20 2a 2f 0d 7d 20 64 | 72 76 72 46 6c 61 67 42 |s */.} d|rvrFlagB|
|00000210| 69 74 73 3b 0d 0d 2f 2a | 20 53 74 72 75 63 74 75 |its;../*| Structu|
|00000220| 72 65 20 6f 66 20 74 68 | 65 20 64 72 69 76 65 72 |re of th|e driver|
|00000230| 20 72 65 73 6f 75 72 63 | 65 20 2a 2f 0d 74 79 70 | resourc|e */.typ|
|00000240| 65 64 65 66 20 73 74 72 | 75 63 74 20 7b 0d 09 73 |edef str|uct {..s|
|00000250| 68 6f 72 74 20 64 72 76 | 72 46 6c 61 67 73 3b 0d |hort drv|rFlags;.|
|00000260| 09 73 68 6f 72 74 20 64 | 72 76 72 44 65 6c 61 79 |.short d|rvrDelay|
|00000270| 3b 0d 09 73 68 6f 72 74 | 20 64 72 76 72 45 4d 61 |;..short| drvrEMa|
|00000280| 73 6b 3b 0d 09 73 68 6f | 72 74 20 64 72 76 72 4d |sk;..sho|rt drvrM|
|00000290| 65 6e 75 3b 0d 09 73 68 | 6f 72 74 20 64 72 76 72 |enu;..sh|ort drvr|
|000002a0| 4f 70 65 6e 3b 0d 09 73 | 68 6f 72 74 20 64 72 76 |Open;..s|hort drv|
|000002b0| 72 50 72 69 6d 65 3b 0d | 09 73 68 6f 72 74 20 64 |rPrime;.|.short d|
|000002c0| 72 76 72 43 74 6c 3b 0d | 09 73 68 6f 72 74 20 64 |rvrCtl;.|.short d|
|000002d0| 72 76 72 53 74 61 74 75 | 73 3b 0d 09 73 68 6f 72 |rvrStatu|s;..shor|
|000002e0| 74 20 64 72 76 72 43 6c | 6f 73 65 3b 0d 09 75 6e |t drvrCl|ose;..un|
|000002f0| 73 69 67 6e 65 64 20 63 | 68 61 72 20 64 72 76 72 |signed c|har drvr|
|00000300| 4e 61 6d 65 5b 5d 3b 0d | 09 75 6e 73 69 67 6e 65 |Name[];.|.unsigne|
|00000310| 64 20 63 68 61 72 20 64 | 72 76 72 52 6f 75 74 69 |d char d|rvrRouti|
|00000320| 6e 65 73 5b 5d 3b 0d 7d | 20 44 72 69 76 65 72 53 |nes[];.}| DriverS|
|00000330| 74 72 75 63 74 2c 20 2a | 44 72 69 76 65 72 50 74 |truct, *|DriverPt|
|00000340| 72 2c 20 2a 2a 44 72 69 | 76 65 72 48 61 6e 64 6c |r, **Dri|verHandl|
|00000350| 65 3b 0d 0d 2f 2a 20 54 | 68 65 73 65 20 74 77 6f |e;../* T|hese two|
|00000360| 20 72 6f 75 74 69 6e 65 | 73 20 61 72 65 20 74 68 | routine|s are th|
|00000370| 65 20 6f 6e 65 73 20 79 | 6f 75 20 77 61 6e 74 20 |e ones y|ou want |
|00000380| 74 6f 20 63 61 6c 6c 20 | 2a 2f 0d 4f 53 45 72 72 |to call |*/.OSErr|
|00000390| 20 49 6e 73 74 61 6c 6c | 52 41 4d 44 72 69 76 65 | Install|RAMDrive|
|000003a0| 72 28 53 74 72 32 35 35 | 20 64 72 76 72 4e 61 6d |r(Str255| drvrNam|
|000003b0| 65 2c 20 73 68 6f 72 74 | 20 2a 72 65 66 4e 75 6d |e, short| *refNum|
|000003c0| 2c 20 64 72 76 72 46 6c | 61 67 42 69 74 73 20 64 |, drvrFl|agBits d|
|000003d0| 72 76 72 49 6e 73 74 46 | 6c 61 67 73 29 3b 0d 4f |rvrInstF|lags);.O|
|000003e0| 53 45 72 72 20 52 65 6d | 6f 76 65 52 41 4d 44 72 |SErr Rem|oveRAMDr|
|000003f0| 69 76 65 72 28 73 68 6f | 72 74 20 72 65 66 4e 75 |iver(sho|rt refNu|
|00000400| 6d 2c 20 64 72 76 72 46 | 6c 61 67 42 69 74 73 20 |m, drvrF|lagBits |
|00000410| 64 72 76 72 52 6d 76 46 | 6c 61 67 73 29 3b 0d 0d |drvrRmvF|lags);..|
|00000420| 2f 2a 20 54 68 65 73 65 | 20 61 72 65 20 75 73 65 |/* These| are use|
|00000430| 64 20 69 6e 74 65 72 6e | 61 6c 6c 79 20 62 75 74 |d intern|ally but|
|00000440| 20 6d 69 67 68 74 20 62 | 65 20 75 73 65 66 75 6c | might b|e useful|
|00000450| 20 69 6e 20 75 6e 75 73 | 75 61 6c 20 63 69 72 63 | in unus|ual circ|
|00000460| 75 6d 73 74 61 6e 63 65 | 73 20 2a 2f 0d 73 68 6f |umstance|s */.sho|
|00000470| 72 74 20 47 65 74 44 72 | 76 72 52 65 66 4e 75 6d |rt GetDr|vrRefNum|
|00000480| 28 53 74 72 32 35 35 20 | 64 72 76 72 4e 61 6d 65 |(Str255 |drvrName|
|00000490| 29 3b 0d 4f 53 45 72 72 | 20 47 72 6f 77 55 54 61 |);.OSErr| GrowUTa|
|000004a0| 62 6c 65 28 73 68 6f 72 | 74 20 6e 65 77 45 6e 74 |ble(shor|t newEnt|
|000004b0| 72 69 65 73 29 3b 0d 4f | 53 45 72 72 20 44 72 69 |ries);.O|SErr Dri|
|000004c0| 76 65 72 41 76 61 69 6c | 28 73 68 6f 72 74 20 2a |verAvail|(short *|
|000004d0| 75 6e 69 74 4e 75 6d 29 | 3b 0d 4f 53 45 72 72 20 |unitNum)|;.OSErr |
|000004e0| 47 65 74 31 53 79 73 58 | 52 73 72 63 28 48 61 6e |Get1SysX|Rsrc(Han|
|000004f0| 64 6c 65 20 2a 72 73 72 | 63 48 6e 64 6c 2c 20 52 |dle *rsr|cHndl, R|
|00000500| 65 73 54 79 70 65 20 72 | 73 72 63 54 79 70 65 2c |esType r|srcType,|
|00000510| 20 73 68 6f 72 74 20 72 | 73 72 63 49 44 2c 20 73 | short r|srcID, s|
|00000520| 68 6f 72 74 20 72 73 72 | 63 49 6e 64 2c 20 53 74 |hort rsr|cInd, St|
|00000530| 72 69 6e 67 50 74 72 20 | 72 73 72 63 4e 61 6d 65 |ringPtr |rsrcName|
|00000540| 29 3b 0d 42 6f 6f 6c 65 | 61 6e 20 50 74 72 49 6e |);.Boole|an PtrIn|
|00000550| 5a 6f 6e 65 28 54 48 7a | 20 74 68 65 5a 6f 6e 65 |Zone(THz| theZone|
|00000560| 2c 20 50 74 72 20 74 68 | 65 50 74 72 29 3b 0d 4f |, Ptr th|ePtr);.O|
|00000570| 53 45 72 72 20 54 68 69 | 6e 6b 49 6e 69 74 28 48 |SErr Thi|nkInit(H|
|00000580| 61 6e 64 6c 65 20 64 72 | 76 72 48 61 6e 64 6c 65 |andle dr|vrHandle|
|00000590| 2c 20 73 68 6f 72 74 20 | 72 73 72 63 49 44 2c 20 |, short |rsrcID, |
|000005a0| 73 68 6f 72 74 20 75 6e | 69 74 4e 75 6d 2c 20 64 |short un|itNum, d|
|000005b0| 72 76 72 46 6c 61 67 42 | 69 74 73 20 64 72 76 72 |rvrFlagB|its drvr|
|000005c0| 49 6e 73 74 46 6c 61 67 | 73 29 3b 0d 4f 53 45 72 |InstFlag|s);.OSEr|
|000005d0| 72 20 54 68 69 6e 6b 43 | 68 61 6e 67 65 43 6f 64 |r ThinkC|hangeCod|
|000005e0| 65 28 48 61 6e 64 6c 65 | 20 64 72 76 72 48 61 6e |e(Handle| drvrHan|
|000005f0| 64 6c 65 2c 20 50 74 72 | 20 63 6f 64 65 50 74 72 |dle, Ptr| codePtr|
|00000600| 2c 20 52 65 73 54 79 70 | 65 20 74 68 65 54 79 70 |, ResTyp|e theTyp|
|00000610| 65 29 3b 0d 4f 53 45 72 | 72 20 54 68 69 6e 6b 41 |e);.OSEr|r ThinkA|
|00000620| 64 64 52 73 72 63 73 28 | 48 61 6e 64 6c 65 20 63 |ddRsrcs(|Handle c|
|00000630| 6f 64 65 48 61 6e 64 6c | 65 2c 20 52 65 73 54 79 |odeHandl|e, ResTy|
|00000640| 70 65 20 74 68 65 54 79 | 70 65 2c 20 73 68 6f 72 |pe theTy|pe, shor|
|00000650| 74 20 72 73 72 63 49 44 | 2c 20 73 68 6f 72 74 20 |t rsrcID|, short |
|00000660| 75 6e 69 74 4e 75 6d 29 | 3b 0d 76 6f 69 64 20 54 |unitNum)|;.void T|
|00000670| 68 69 6e 6b 43 6c 65 61 | 6e 75 70 28 48 61 6e 64 |hinkClea|nup(Hand|
|00000680| 6c 65 20 64 72 76 72 48 | 61 6e 64 6c 65 2c 20 42 |le drvrH|andle, B|
|00000690| 6f 6f 6c 65 61 6e 20 72 | 6d 76 44 41 54 41 29 3b |oolean r|mvDATA);|
|000006a0| 0d 76 6f 69 64 20 54 68 | 69 6e 6b 52 6d 76 52 73 |.void Th|inkRmvRs|
|000006b0| 72 63 73 28 50 74 72 20 | 63 6f 64 65 50 74 72 2c |rcs(Ptr |codePtr,|
|000006c0| 20 42 6f 6f 6c 65 61 6e | 20 69 73 48 61 6e 64 6c | Boolean| isHandl|
|000006d0| 65 2c 20 42 6f 6f 6c 65 | 61 6e 20 72 6d 76 44 41 |e, Boole|an rmvDA|
|000006e0| 54 41 29 3b 0d 0d 23 65 | 6e 64 69 66 20 2f 2a 20 |TA);..#e|ndif /* |
|000006f0| 5f 5f 44 52 49 56 45 52 | 5f 5f 20 2a 2f 00 00 00 |__DRIVER|__ */...|
|00000700| 00 00 01 00 00 00 01 14 | 00 00 00 14 00 00 00 46 |........|.......F|
|00000710| 65 73 4c 69 73 74 00 1c | 00 00 36 4a 01 c5 00 1d |esList..|..6J....|
|00000720| 95 5a 00 00 0d 2a 67 65 | 74 52 65 73 50 61 74 63 |.Z...*ge|tResPatc|
|00000730| 08 64 72 69 76 65 72 2e | 68 00 02 00 00 00 50 61 |.driver.|h.....Pa|
|00000740| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|00000750| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 a9 80 18 34 00 00 | 00 00 00 00 01 5a 72 48 |.....4..|.....ZrH|
|00000780| 61 6e 64 6c 65 20 00 28 | 00 00 48 59 02 57 00 1e |andle .(|..HY.W..|
|00000790| 0b ca 00 00 19 2a 64 72 | 76 72 48 61 6e 64 6c 65 |.....*dr|vrHandle|
|000007a0| 20 2b 20 63 6f 64 65 4f | 66 66 73 65 74 20 00 1a | + codeO|ffset ..|
|000007b0| 00 00 49 65 02 66 00 1e | 0b ba 00 00 0b 63 6f 64 |..Ie.f..|.....cod|
|000007c0| 65 48 61 6e 64 6c 65 20 | 00 16 00 00 4a 36 02 6c |eHandle |....J6.l|
|000007d0| 00 1e 0b aa 00 00 07 4d | 65 6d 45 72 72 20 00 00 |.......M|emErr ..|
|000007e0| 00 08 00 09 04 43 6f 64 | 65 ff 00 00 00 04 00 06 |.....Cod|e.......|
|000007f0| 00 04 00 00 01 00 00 00 | 02 f2 00 00 01 f2 00 00 |........|........|
|00000800| 00 00 00 04 00 06 00 04 | 00 00 00 08 00 09 04 43 |........|.......C|
|00000810| 6f 64 65 d7 00 00 01 00 | 00 00 01 14 00 00 00 14 |ode.....|........|
|00000820| 00 00 00 46 00 42 19 8c | 0c 7e 00 00 00 1c 00 46 |...F.B..|.~.....F|
|00000830| 00 01 45 54 41 42 00 00 | 00 12 45 46 4e 54 00 00 |..ETAB..|..EFNT..|
|00000840| 00 1e 03 ec ff ff 00 00 | 00 00 00 42 18 78 03 eb |........|...B.x..|
|00000850| ff ff 00 00 00 08 00 42 | 17 ec 00 00 00 00 00 00 |.......B|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+